package edu.ccut.titan.tag.report.tag;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;

public class TitanParameterTag extends TagSupport {
	private static final long serialVersionUID = 1L;
	private String key;
	private String value;
	private TitanReportTag report;

	@Override
	public int doStartTag() throws JspException {
		report = (TitanReportTag) this.getParent();
		report.addParameterInfo(key, value);
		return EVAL_BODY_INCLUDE;
	}

	@Override
	public int doEndTag() throws JspException {
		return SKIP_BODY;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

}
